﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace zichan.Entity
{
    public class Cabinet
    {
        [Key]
        public int Id { get; set; }
        [Required(ErrorMessage ="机柜名称不能为空")]
        public string Name { get; set; }
        [Required(ErrorMessage ="机房必选")]
        public int MachineRoomId { get; set; }
        [NotMapped]
        public string MachineRoomName { get; set; }
        [Required(ErrorMessage = "请输入标准柜允许上架1U设备的最大台数")]
        [RegularExpression(@"^\+?[1-9]\d*$", ErrorMessage = "请输入标准柜允许上架1U设备的最大台数")]
        public int Number { get; set; }
        public string Remark { get; set; }
        public DateTime uploadTime { get; set; }
        public int? IsDelete { get; set; }
    }
}
